<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	template="/pages/templates/template.xhtml">
	<ui:define name="metadata">
		<f:metadata>
			<f:viewParam name="id" value="#{NotaBean.id}" />
			<f:event type="preRenderView" listener="#{NotaBean.init}" />
		</f:metadata>
	</ui:define>
	<ui:define name="content">
		<h:form id="formNotas">
			<div>
				<div class="div-titulo-tela">
					<p:outputLabel styleClass="titulo-tela">Aluno</p:outputLabel>
					<br /> <br />
					<p:separator></p:separator>
					<div class="div-titulo-botoes">
						<p:commandButton value="Grupos"
							actionListener="#{NotaBean.doListar}" />

						<p:commandButton id="btnSalvar" value="Salvar" ajax="true"
							update="formNotas" actionListener="#{NotaBean.doSalvar}">
						</p:commandButton>
					</div>
				</div>
				<div>
					<div class="div-corpo-tela">
						<div class="div-mensagem">
							<p:messages id="messages" autoUpdate="true" closable="true" />
						</div>
						<p:outputLabel>Grupo: #{NotaBean.grupo.grupo}</p:outputLabel>
						<br /> <br />
						<p:panel header="Notas TCC 1">
							<p:dataTable id="tableNotasTC1" var="nota" editable="true"
								editMode="cell" value="#{NotaBean.notasTC1}">
								<p:column headerText="Nota">
									<p:outputLabel>#{nota.tipoNota}</p:outputLabel>
								</p:column>
								<p:column headerText="Valor">
									<p:cellEditor>
										<f:facet name="output">
											<h:outputText value="#{nota.valor}" />
										</f:facet>
										<f:facet name="input">
											<p:inputText value="#{nota.valor}" label="Valor" style="width:96%"
												maxlength="4" />
										</f:facet>
									</p:cellEditor>
								</p:column>
								<p:column headerText="Professor">
									<p:outputLabel>#{nota.professor.nome}</p:outputLabel>
								</p:column>
							</p:dataTable>
						</p:panel>

						<br />

						<p:panel header="Notas TCC 2">
							<p:dataTable id="tableNotasTC2" var="nota" editable="true"
								editMode="cell" value="#{NotaBean.notasTC2}">
								<p:column headerText="Nota">
									<p:outputLabel>#{nota.tipoNota}</p:outputLabel>
								</p:column>
								<p:column headerText="Valor">
									<p:cellEditor>
										<f:facet name="output">
											<h:outputText value="#{nota.valor}" />
										</f:facet>
										<f:facet name="input">
											<p:inputText value="#{nota.valor}" label="Valor" style="width:96%"
												maxlength="4" />
										</f:facet>
									</p:cellEditor>
								</p:column>
								<p:column headerText="Professor">
									<p:outputLabel>#{nota.professor.nome}</p:outputLabel>
								</p:column>
							</p:dataTable>
						</p:panel>
					</div>
				</div>
			</div>
		</h:form>
	</ui:define>
</ui:composition>

